package com.biz.primus.ms.adv.trans;

import com.biz.primus.model.adv.vo.AdPositionVo;
import com.biz.primus.ms.adv.dao.ro.AdPositionRo;
import com.google.common.base.Function;

/**
 * @author jun.liu
 * @date 2017/9/18
 */
public class AdPositionRo2AdPositionVo implements Function<AdPositionRo, AdPositionVo> {

    @Override
    public AdPositionVo apply(AdPositionRo input) {
        AdPositionVo vo = new AdPositionVo();
        if (input.getId() != null) {
            vo.setId(String.valueOf(input.getId()));
        }
        vo.setName(input.getName());
        vo.setWidth(input.getWidth());
        vo.setHeight(input.getHeight());
        vo.setDescription(input.getDescription());
        vo.setUseType(input.getUseType());
        vo.setInvalid(input.isInvalid());
        vo.setAdUsePlace(input.getAdUsePlace());
        return vo;
    }

}
